/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Leoz
 */
@Embeddable
public class SoundtrackPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idSoundtrack")
    private int idSoundtrack;
    @Basic(optional = false)
    @Column(name = "Song_idSong")
    private int songidSong;
    @Basic(optional = false)
    @Column(name = "Song_Artist_idArtist")
    private int songArtistidArtist;

    public SoundtrackPK() {
    }

    public SoundtrackPK(int idSoundtrack, int songidSong, int songArtistidArtist) {
        this.idSoundtrack = idSoundtrack;
        this.songidSong = songidSong;
        this.songArtistidArtist = songArtistidArtist;
    }

    public int getIdSoundtrack() {
        return idSoundtrack;
    }

    public void setIdSoundtrack(int idSoundtrack) {
        this.idSoundtrack = idSoundtrack;
    }

    public int getSongidSong() {
        return songidSong;
    }

    public void setSongidSong(int songidSong) {
        this.songidSong = songidSong;
    }

    public int getSongArtistidArtist() {
        return songArtistidArtist;
    }

    public void setSongArtistidArtist(int songArtistidArtist) {
        this.songArtistidArtist = songArtistidArtist;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idSoundtrack;
        hash += (int) songidSong;
        hash += (int) songArtistidArtist;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SoundtrackPK)) {
            return false;
        }
        SoundtrackPK other = (SoundtrackPK) object;
        if (this.idSoundtrack != other.idSoundtrack) {
            return false;
        }
        if (this.songidSong != other.songidSong) {
            return false;
        }
        if (this.songArtistidArtist != other.songArtistidArtist) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.SoundtrackPK[ idSoundtrack=" + idSoundtrack + ", songidSong=" + songidSong + ", songArtistidArtist=" + songArtistidArtist + " ]";
    }
    
}
